package com.ruoyi.live.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.live.mapper.TbWatchMapper;
import com.ruoyi.live.domain.TbWatch;
import com.ruoyi.live.service.ITbWatchService;

/**
 * guankan jiluService业务层处理
 * 
 * @author sun
 * @date 2023-01-30
 */
@Service
public class TbWatchServiceImpl implements ITbWatchService 
{
    @Autowired
    private TbWatchMapper tbWatchMapper;

    /**
     * 查询guankan jilu
     * 
     * @param watchId guankan jilu主键
     * @return guankan jilu
     */
    @Override
    public TbWatch selectTbWatchByWatchId(Integer watchId)
    {
        return tbWatchMapper.selectTbWatchByWatchId(watchId);
    }

    /**
     * 查询guankan jilu列表
     * 
     * @param tbWatch guankan jilu
     * @return guankan jilu
     */
    @Override
    public List<TbWatch> selectTbWatchList(TbWatch tbWatch)
    {
        return tbWatchMapper.selectTbWatchList(tbWatch);
    }

    /**
     * 新增guankan jilu
     * 
     * @param tbWatch guankan jilu
     * @return 结果
     */
    @Override
    public int insertTbWatch(TbWatch tbWatch)
    {
        tbWatch.setCreateTime(DateUtils.getNowDate());
        return tbWatchMapper.insertTbWatch(tbWatch);
    }

    /**
     * 修改guankan jilu
     * 
     * @param tbWatch guankan jilu
     * @return 结果
     */
    @Override
    public int updateTbWatch(TbWatch tbWatch)
    {
        tbWatch.setUpdateTime(DateUtils.getNowDate());
        return tbWatchMapper.updateTbWatch(tbWatch);
    }

    /**
     * 批量删除guankan jilu
     * 
     * @param watchIds 需要删除的guankan jilu主键
     * @return 结果
     */
    @Override
    public int deleteTbWatchByWatchIds(Integer[] watchIds)
    {
        return tbWatchMapper.deleteTbWatchByWatchIds(watchIds);
    }

    /**
     * 删除guankan jilu信息
     * 
     * @param watchId guankan jilu主键
     * @return 结果
     */
    @Override
    public int deleteTbWatchByWatchId(Integer watchId)
    {
        return tbWatchMapper.deleteTbWatchByWatchId(watchId);
    }
}
